package com.xyzh.application.config.security;


import com.xyzh.application.config.security.Md5Encode;
import org.springframework.security.crypto.password.PasswordEncoder;

public class myPasswordEncoder implements PasswordEncoder {
    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return encodedPassword.equals(Md5Encode.encode((String)rawPassword));
    }

    @Override
    public String encode(CharSequence rawPassword) {
        return Md5Encode.encode((String)rawPassword);
    }



}
